package com.example.orderservice2.service;

import com.example.orderservice2.bean.Order;
import com.example.orderservice2.dao.OrderDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderService {
    @Resource
    private OrderDao dao;

    public List<Order> findAll() { return dao.findAll(); }
    public Order findById(Long id) { return dao.findById(id); }
    public int createOrder(Order order) { return dao.insert(order); }
    public int updateStatus(Long id, String status) { return dao.updateStatus(id, status); }
}